<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="pragram" content="no-cache"/>
    <meta http-equiv="cache-control" content="no-cache, must-revalidate"/>
    <meta http-equiv="expires" content="0"/>
    <meta name="renderer" content="webkit"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>运营规则设定</title>

    <link rel="stylesheet" href="/assets/css/lib/bootstrap.min.css">
    <link rel="stylesheet" href="/assets/css/lib/pagination.css">

    <link rel="stylesheet" href="/assets/css/common.css">
    <link rel="stylesheet" href="/assets/css/operating_rules.css">

</head>
<body>
<div id="cms">
    <jsp:include page="title_bar.jsp"/>
    <jsp:include page="tab_bar.jsp"/>
    <div class="cms-content">
        <div class="current-place">
            <div class="place-title">当前位置:</div>
            <div class="place-val">首页/运营规则设定</div>
        </div>
        <div class="cms-sub-content clearfix">
            <div class="warning">注意：以下参数均为无限期全局变量，改动会对所有运营数据产生影响，请务必谨慎，并确认已经做好足够的准备工作！</div>
            <div class="table-util">
                <div class="common-title">
                    <div class="common-left-line"></div>
                    <div class="common-text">通话效果参数设定</div>
                    <!if(role==0){!>
                    <div class=" common-right-btn result-add-btn" name="roleMenu" onclick="add_show_thxg()">新增</div>
                    <!}!>
                </div>
                <div class="table-box result-table">
                    <table class="table table-bordered">
                        <thead>
                        <th>项目</th>
                        <th>英文标识</th>
                        <th>数值</th>
                        <th>备注</th>
                        <th>操作</th>
                        </thead>
                        <tbody id="ruleslist">

                        </tbody>

                        <script id="ruleslisttmp" type="text/html">
                            <!for(k in result){
                            var v=result[k];
                            !>
                            <tr>
                                <td class="confName"><!=v.confName!></td>
                                <td class="confEname"><!=v.confEname!></td>
                                <td class="confValue"><!= parseValue( v.confEname ,v.confValue ) !></td>
                                <td class="remark"> <!=v.remark!></td>
                                <td class="operate">
                                    <!if(role==0){!>
                                    <div class="result-status-btn  <!=v.isStatus==0?'result-status-active':''!>"
                                         data-value="<!=v.isStatus!>"
                                         id-value="<!=v.allId!>" onclick="changeStatus(this)"
                                    > <!=v.isStatus==0?'启用':'停用'!>
                                    </div>



                                    <div class="result-edit edit-btn"
                                         data-value="<!=v.isStatus!>"
                                         id-value="<!=v.allId!>" onclick="edit_show_thxg(this)"
                                    >编辑
                                    </div>

                                    <!}!>

                                </td>
                            </tr>
                            <!}!>
                        </script>
                    </table>
                </div>
            </div>
            <div class="table-util rate-table">
                <div class="common-title">
                    <div class="common-left-line"></div>
                    <div class="common-text">通话频次参数设定</div>
                    <div class=" common-right-btn rate-add-btn" name="roleMenu" onclick="add_show_thpc()">新增</div>
                </div>
                <div class="table-box">
                    <table class="table table-bordered">
                        <thead>
                        <th>项目</th>
                        <th>英文标识</th>
                        <th>数值</th>
                        <th>通话次数</th>
                        <th>备注</th>
                        <th>操作</th>
                        </thead>
                        <tbody id="ruleslist2">

                        </tbody>
                        <script id="ruleslisttmp2" type="text/html">
                            <!for(k in result){
                            var v=result[k];
                            !>
                            <tr>
                                <td class="confName"><!=v.confName!></td>
                                <td class="confEname"><!=v.confEname!></td>
                                <td class="confValue"><!=v.confValue!></td>
                                <td class="bak"><!=v.bak!></td>
                                <td class="remark"><!=v.remark!></td>
                                <td class="operate">
                                    <!if(role==0){!>
                                    <div class="result-status-btn  <!=v.isStatus==0?'result-status-active':''!>"
                                         data-value="<!=v.isStatus!>"
                                         id-value="<!=v.allId!>" onclick="changeStatus(this)"
                                    > <!=v.isStatus==0?'启用':'停用'!>
                                    </div>
                                    <div class="result-edit edit-btn"
                                         data-value="<!=v.isStatus!>"
                                         id-value="<!=v.allId!>" onclick="edit_show_thpc(this)"
                                    >编辑
                                    </div>
                                    <!}!>
                                </td>
                            </tr>
                            <!}!>
                        </script>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

</div>
<!--通话效果参数设定-->
<div class="cms-modal-lg" id="result-pop">
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">设置通话效果参数</div>
        <div class="cms-madal-content">
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">项目</div>
                    <div class="state-right ">
                        <input type="text" class="form-control result-project-name" id="confName_edit">
                        <input type="text" id="allIdthxg" style="display: none" required="true">
                    </div>
                </div>
                <div class="two-stage">
                    <div class="state-left" id="unit_0">时长</div>
                    <div class="state-right time">
                        <input type="text" class="form-control" id="confValue_edit">
                        <span id="unit_1">秒</span>
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">英文标识</div>
                    <div class="state-right">
                        <input type="text" class="form-control result-Ename" id="confEname_edit">
                    </div>
                </div>

            </div>
            <div class="remark-title">备注</div>
            <div>
                <textarea placeholder="请输入备注" class="common-remark result-remark" id="remark_edit"></textarea>
                <div class="limit200">限200字</div>
            </div>

        </div>
        <div class="cms-modal-bottom clearfix">
            <button type="button" class="cms-confirm result-save" onclick="save_thxg()">保存</button>
            <button type="button" class="cms-cancel result-cancel" onclick="cancel_btn()">取消</button>
        </div>
    </div>
</div>
<!--通话频次参数设定-->
<div class="cms-modal-lg" id="rate-pop">
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">设置通话频次参数</div>
        <div class="cms-madal-content">
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">项目</div>
                    <div class="state-right ">
                        <input type="text" class="form-control rate-project-name" id="thpc_confName" required="true">
                        <input type="text" id="allIdthpc" style="display: none" required="true">
                    </div>
                </div>
                <div class="two-stage">
                    <div class="state-left">时间范围</div>
                    <div class="state-right time-range">
                        <input type="text" class="form-control" id="thpc_confValue">
                        <span>秒</span>
                    </div>
                </div>
                <div class="two-stage">
                    <div class="state-left">通话次数</div>
                    <div class="state-right call-num">
                        <input type="text" class="form-control" id="thpc_bak">
                        <span>次</span>
                    </div>
                </div>
            </div>
            <div class="state-unit">
                <div class="two-stage">
                    <div class="state-left">英文标识</div>
                    <div class="state-right">
                        <input type="text" class="form-control result-Ename" id="thpc_confEname">
                    </div>
                </div>

            </div>
            <div class="remark-title">备注</div>
            <div>
                <textarea placeholder="请输入备注" class="common-remark rate-remark" id="thpc_remark"></textarea>
                <div class="limit200">限200字</div>
            </div>

        </div>
        <div class="cms-modal-bottom clearfix">
            <button type="button" class="cms-confirm rate-save" onclick="save_thpc()">保存</button>
            <button type="button" class="cms-cancel rate-cancel" onclick="cancel_btn()">取消</button>
        </div>
    </div>
</div>
<div class="cms-modal-ms" id="operate-before-pop" style="display: none">
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">操作提醒</div>
        <div class="cms-madal-content">
            <div class="operate-before-info">任何运营规则的修改都可能对系统整体产生影响，<br/> 您确认要对本条规则进行修改吗？</div>
        </div>
        <div class="cms-modal-bottom">
            <button type="button" class="cms-confirm operate-before-confirm">确定</button>
            <button type="button" class="cms-cancel operate-before-cancel">放弃</button>
        </div>
    </div>
</div>
<div class="cms-modal-ms" id="operate-after-pop" style="display: none">
    <div class="cms-modal-dialog">
        <div class="cms-modal-title">操作提醒</div>
        <div class="cms-madal-content">
            <div class="operate-after-question">请再次确认您要对本条规则进行修改吗？</div>
            <div class="operate-after-info">请务必保证您已经做好了充分的准备工作与运营、市 场、研发等部门沟通过。</div>
        </div>
        <div class="cms-modal-bottom">
            <button type="button" class="cms-confirm operate-after-confirm">确定</button>
            <button type="button" class="cms-cancel operate-after-cancel">放弃</button>
        </div>
    </div>
</div>

</body>
<script type="text/javascript" src="/assets/js/lib/jquery-1.12.3.js"></script>
<script type="text/javascript" src="/assets/js/lib/bootstrap.min.js"></script>
<script type="text/javascript" src="/assets/js/lib/modal.js"></script>
<script type="text/javascript" src="/assets/js/lib/cmsmodal.js"></script>

<script type="text/javascript" src="/assets/js/lib/distpicker.data.js"></script>
<script type="text/javascript" src="/assets/js/lib/distpicker.js"></script>
<script type="text/javascript" src="/assets/js/lib/jquery.pagination.js"></script>

<script type="text/javascript" src="/assets/js/lib/My97DatePicker/WdatePicker.js"></script>

<script type="text/javascript" src="/assets/js/common.js"></script>
<script type="text/javascript" src="/assets/js/communal/template.js"></script>

<script type="text/javascript" src="/assets/js/operating_rules.js"></script>
</html>